package com.huijie.app.u.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.huijie.core.common.BaseEntity;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * Token表
 * </p>
 *
 * @author echen
 * @since 2019-01-10
 */
@TableName("u_token")
public class Token extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 令牌id
     */
    private String tokenId;

    /**
     * 客户标识（用户名、账号）
     */
    private String appId;

    /**
     * 签发者(JWT令牌此项有值)
     */
    private String issuer;

    /**
     * 签发时间
     */
    private Date issuedAt;

    /**
     * 接收方(JWT令牌此项有值)
     */
    private String audience;

    /**
     * 访问主张-角色(JWT令牌此项有值)
     */
    private String roles;

    /**
     * 访问主张-资源(JWT令牌此项有值)
     */
    private String perms;

    /**
     * 客户地址
     */
    private String host;

    /**
     * 有效期
     */
    private Date expiration;

    /**
     * 该TokenId对应的版本
     */
    private String version;

    /**
     * 用户类型
     */
    private Integer userType;

    /**
     * 用户系统ID
     */
    private Integer userId;

    /**
     * 用户名称
     */
    private String userName;

    public String getTokenId() {
        return tokenId;
    }

    public void setTokenId(String tokenId) {
        this.tokenId = tokenId;
    }
    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }
    public String getIssuer() {
        return issuer;
    }

    public void setIssuer(String issuer) {
        this.issuer = issuer;
    }
    public Date getIssuedAt() {
        return issuedAt;
    }

    public void setIssuedAt(Date issuedAt) {
        this.issuedAt = issuedAt;
    }
    public String getAudience() {
        return audience;
    }

    public void setAudience(String audience) {
        this.audience = audience;
    }
    public String getRoles() {
        return roles;
    }

    public void setRoles(String roles) {
        this.roles = roles;
    }
    public String getPerms() {
        return perms;
    }

    public void setPerms(String perms) {
        this.perms = perms;
    }
    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }
    public Date getExpiration() {
        return expiration;
    }

    public void setExpiration(Date expiration) {
        this.expiration = expiration;
    }
    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }
    public Integer getUserType() {
        return userType;
    }

    public void setUserType(Integer userType) {
        this.userType = userType;
    }
    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    @Override
    public String toString() {
        return "Token{" +
        "tokenId=" + tokenId +
        ", appId=" + appId +
        ", issuer=" + issuer +
        ", issuedAt=" + issuedAt +
        ", audience=" + audience +
        ", roles=" + roles +
        ", perms=" + perms +
        ", host=" + host +
        ", expiration=" + expiration +
        ", version=" + version +
        ", userType=" + userType +
        ", userId=" + userId +
        ", userName=" + userName +
        "}";
    }
}
